class Solution {
public:
    int maxVowels(string s, int k) {
        unordered_set<char> se={'a','e','i','o','u'};
        int n=s.size(),ans=0,m=0;
        for(int left=0,right=0;right<n;++right)
        {
            if(se.count(s[right])) ++m;
            while(left<=right&&right-left+1>k)
            {
                if(se.count(s[left++])) --m;
            }
            ans=max(ans,m);
        }
        return ans;
    }
};